local ty_xiangyang = fk.CreateSkill {
  name = "ty_xiangyang",
  mode_skill = true,
}

Fk:loadTranslationTable{
  ["ty_xiangyang"] = "襄阳",
  [":ty_xiangyang"] = "回合结束时，你可以选择一项：1.执行一个额外的出牌阶段；2.执行一个额外的摸牌阶段。",

  ["#ty_xiangyang-invoke"] = "襄阳：选择执行的额外阶段",
}

ty_xiangyang:addEffect(fk.EventPhaseEnd, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(ty_xiangyang.name) and player.phase == Player.Finish
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local choice = room:askToChoice(player, {
      choices = {"phase_draw", "phase_play"},
      skill_name = ty_xiangyang.name,
      prompt = "#ty_xiangyang-invoke",
    })
    player:gainAnExtraPhase(choice == "phase_draw" and Player.Draw or Player.Play)
  end,
})

return ty_xiangyang